Traffic prediction using real-world transportation data

ABSTRACT

Systems and techniques for enhancing accuracy of traffic prediction include a system of one or more computers operable to receive a request relating to traffic prediction, compare a first prediction error for a first (moving average) traffic prediction model with a second prediction error for a second (historical average) traffic prediction model, calculated using a historical data set selected from previously recorded traffic data in accordance with a day and time associated with the request, select use of the first model or the second model based on the comparison of prediction errors, and provide an output for use in traffic prediction, wherein the output comes from applying the first traffic prediction model when the first prediction error is less than the second prediction error, and the output comes from applying the second traffic prediction model when the first prediction error is not less than the second prediction error.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a divisional application of, and claims the benefitof priority from, U.S. application Ser. No. 14/060,360, entitled“Traffic Prediction Using Real-World Transportation Data”, filed Oct.22, 2013, and issuing as U.S. Pat. No. 9,286,793 on Mar. 15, 2016, whichclaims the benefit of priority from U.S. Provisional Applicationentitled “Utilizing Real-World Transportation Data for Accurate TrafficPrediction”, filed Oct. 23, 2012, Application Ser. No. 61/717,574, thedisclosure of which is incorporated by reference in its entirety.

STATEMENT AS TO FEDERALLY SPONSORED RESEARCH

This invention was made with government support under National ScienceFoundation (NSF) grant number IIS-1115153. The government has certainrights in the invention.

BACKGROUND

This specification relates to traffic prediction for road networks.

The two most important commodities of the 21st century are time andenergy; traffic congestion wastes both. Several disciplines, such as intransportation science, civil engineering, policy planning, andoperations research have studied the traffic congestion problem throughmathematical models, simulation studies and field surveys. However, dueto the recent sensor instrumentations of road networks in major citiesas well as the vast availability of auxiliary commodity sensors fromwhich traffic information can be derived, e.g., CCTV (closed-circuittelevision) cameras, GPS (global positioning system) devices, for thefirst time a large volume of real-time traffic data at very high spatialand temporal resolutions has become available. While this is a gold mineof data, the most popular utilization of this data is to simplyvisualize and utilize the current real-time traffic congestion on onlinemaps, car navigation systems, sig-alerts, or mobile applications.However, the most useful application of this data is to predict thetraffic ahead of you during the course of a commute. This predictiveinformation can be either used by a driver directly to avoid potentialgridlocks or consumed by a smart route-planning algorithm to ensure adriver picks the best route from the start. Using traffic informationthat avoids congestion can potentially save consumers substantialamounts of time and money.

SUMMARY

In the past, several statistics, machine learning and data miningapproaches have been applied to traffic data for prediction purposes,such as auto-regression, neural net and smoothing techniques (see S. Leeet al., “Application of subset autoregressive integrated moving averagemodel for short-term freeway traffic volume forecasting”, J. van Lint etal., “Freeway travel time prediction with State-Space neural networks”,and B. Williams et al., “Urban freeway traffic flow prediction:Application of seasonal autoregressive integrated moving average andexponential smoothing models”). However, in this paper, a very pragmaticapproach is described to evaluate and then enhance these techniques byintensely studying a very large-scale and high-resolution spatiotemporaltransportation data from the Los Angeles County road network. Thisdataset includes traffic flows recorded by under-pavement loop detectorsas well as police reports on accidents and events. In someimplementations, a system acquires these datasets in real time fromvarious agencies such as Caltrans, City of Los Angeles Department ofTransportation (LADOT), California Highway Patrol (CHP), Long BeachTransit (LBT), Foothill Transit (FHT) and LA Metro. In someimplementations, a main source can include approximately 8000 trafficloop-detectors located on the highways and arterial streets of LosAngeles County (covering 3420 miles, cumulatively) collecting severalmain traffic parameters such as occupancy, volume, and speed at the rateof 1 reading per 30 secs. However, even though this paper focuses on thesensor data collected from loop detectors, the systems and techniquesdescribed can be applied to other data collection approaches. Forexample, GPS data between regions can be aggregate (see J. Yuan ete al.,“Driving with knowledge from the physical world”), and the links betweenregions can be considered as sensors in some implementations.

Working with real-world data, we have identified certain characteristicsof traffic data, such as temporal patterns of rush hours or the spatialimpacts of accidents, which can be incorporated into a data-miningtechnique to make it much more accurate. For example, for generictime-series, the observations made in the immediate past are usually agood indication of the short-term future. However, for traffictime-series, this is not true at the edges of the rush hours. In thatcase, the historical observations (perhaps for that same day, time, andlocation) can be better predictors of the future. Hence, anauto-regression algorithm such as ARIMA (see G. Box et al., “Time-seriesanalysis: Forecasting and control”), which by itself cannot capturesudden changes at the temporal boundaries of rush hours, can be enhancedby incorporating historical patterns.

While predicting the short-term future has many applications, forexample in fixing the errors of sig-alerts during rush-hours, it is notuseful for smart path-planning where sometimes we need to know thetraffic of a road-segment ahead of us by 30 minutes in advance. Again,historical data can improve long-term predictions because most probablythe traffic behavior in 30 minutes at the desired location is similar to(say) yesterday's traffic at the same time and location. In this case,again ARIMA alone cannot be as effective since it only looks atimmediate past and not the right subset of the historical patterns.

Unfortunately, even an enhanced ARIMA cannot predict accidents. However,if we know, e.g., from police event streams, that there is an accident(say, 30 minutes) ahead of us, we may be able to predict its delays andaccount for it. Again, historical data can be used to identify similaraccidents, i.e., with similar severity, similar location and during thesimilar time, so that we can use their impact on average speed changesand backlog to predict the behavior of the accident in front of us. Forexample, our study shows that an accident that may happen between 4:00pm and 8:00 pm on a particular segment of Interstate 5 (1-5) can cause5.5 miles of average backlog ahead of the accident location. On theother hand, if the same accident happens between 8:00 pm and midnightthe backlog will be 2.5 miles.

The main challenge is how to properly incorporate all the knowledge fromhistorical and real-time data into an appropriate time-series miningtechnique. This is exactly what has been accomplished in this paper byenhancing ARIMA. Our experimental results with real-world LA data showthat our enhanced ARIMA can outperform ARIMA by 78% when there is nounexpected events, and over 91% in the presence of events. In addition,we compared our enhanced approach with other competitor techniques usedfor traffic prediction and showed the superiority of our approach.

Traditional prediction approaches are analyzed herein based on areal-world dataset, and their limitations are discovered at boundariesof rush hours, or in long term prediction. To overcome such limitations,we propose a hybrid approach that utilizes both historical trafficpatterns and current traffic speed for prediction. We also proposefeature selection model(s) to analyze the correlations betweenmeta-attributes of traffic incidents (from event reports) and theirimpact areas (from traffic data). Later, we incorporate this model intothe hybrid traffic prediction approach to predict traffic in thepresence of incidents. Further, we evaluate our approaches withreal-world traffic data and event reports collected from transportationagencies, to show remarkable improvement in terms of prediction accuracyas compared with traditional traffic prediction approaches, especiallyat the boundaries of rush hours and at the beginning of unexpectedtraffic events, and for long term prediction.

In general, an aspect of the subject matter described in thisspecification can be embodied in a method that includes the actions of:receiving a request relating to traffic prediction, the request havingan associated day and an associated time; determining how much to applyeach of a first traffic prediction model and a second traffic predictionmodel based on previously recorded traffic data corresponding to theassociated day and the associated time, wherein the first trafficprediction model includes a moving average model that exhibits increasedprediction accuracy as a prediction time horizon is reduced, and thesecond traffic prediction model includes a historical average model thatexhibits similar prediction accuracy across multiple prediction timehorizons; and applying the first and second traffic prediction models inaccordance with the determining to generate an output for use inrelation to traffic prediction. Other embodiments of this aspect includecorresponding systems, apparatus, and computer program products.

For example a system can include a user interface device and one or morecomputers operable to interact with the user interface device, where theone or more computers include at least one processor and at least onememory device, and the one or more computers are configured and arrangedto perform operations of the method(s). The one or more computers caninclude a server operable to interact with the user interface devicethrough a data communication network, and the user interface device canbe operable to interact with the server as a client. The user interfacedevice can include a mobile phone. In addition, the one or morecomputers can include one personal computer, and the personal computercan include the user interface device.

These and other embodiments can optionally include one or more of thefollowing features. The determining can include: calculating a firstprediction error for the first traffic prediction model and a secondprediction error for the second traffic prediction model; and selectingbetween use of the first traffic prediction model and the second trafficprediction model based on the first prediction error and the secondprediction error. The calculating can be based on a time and timehorizon associated with the request. Moreover, the determining caninclude identifying the corresponding traffic data by identifying asubset of previously recorded traffic data that exhibits similar trafficconditions on a specific day of week, month or season that matches theassociated day for the request.

The method(s) can include: receiving information regarding an event thathas one or more attributes that are correlated with reduction in trafficflow on one or more roads of a road network approaching the event;calculating an influenced speed change and an influenced time shift, fora sensor associated with the road network, based on the informationregarding the event (e.g., including start time, location, direction,and severity of the event as compared with similar historical events);and using the influenced speed change and the influenced time shift inapplication of the first traffic prediction model. Calculating theinfluenced speed change and the influenced time shift can includescalculating based on attributes for the event including (i) start time,(ii) location, (iii) direction, (iv) event type, and (v) affected lanes.

The previously recorded traffic data can include data derived frommobile sensor data. The method(s) can include generating the deriveddata by performing operations including: calculating speeds for multiplemobile sensors from mobile sensor data with respect to connected roadsegments in a road network; and generating a speed for a road segment ofthe connected road segments by calculating an aggregation of all speedscalculated for mobile sensors passing the road segment at a given time.In addition, the mobile sensor data can be obtained from public transitvehicles.

According to another aspect of the subject matter described in thisspecification, a method of predicting traffic on a road network in viewof an event having an identified time and an identified location in theroad network, where the method includes the actions of: retrievingattributes from past events on the road network; selecting a subset ofthe attributes that are correlated with traffic parameters includingdelayed traffic speeds, affected backlogs of vehicles, and amounts oftime needed to clear backlogs of vehicles; discovering correspondingvalues for the traffic parameters under all combinations of the selectedattributes; matching current attributes for the event in the roadnetwork to previous event attributes using the corresponding values forthe traffic parameters to identify a subset of the past events; andusing the identified time, the identified location, and the subset ofthe past events to predict (i) a delayed traffic speed for the event,(ii) an affected backlog of vehicles on one or more roads approachingthe event in the road network, and (iii) an amount of time needed forthe affected backlog of vehicles to be cleared in the road network.Other embodiments of this aspect include corresponding systems,apparatus, and computer program products.

These and other embodiments can optionally include one or more of thefollowing features. The selected attributes can include (i) start time,(ii) location, (iii) direction, (iv) event type, and (v) affected lanes.The past events can include accidents, vehicle breakdowns, scheduled orunscheduled road closures or construction, emergencies, and socialevents, including concert and sporting events. The method(s) can includepredicting traffic on the road network using previously recorded trafficdata including data derived from mobile sensor data, and the method(s)can include generating the derived data by performing operationsincluding: calculating speeds for multiple mobile sensors from mobilesensor data (e.g., obtained from public transit vehicles) with respectto connected road segments in a road network; and generating a speed fora road segment of the connected road segments by calculating anaggregation of all speeds calculated for mobile sensors passing the roadsegment at a given time.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A shows an effect of prediction horizon when comparingauto-regressive integrated moving average and historical average modelsof traffic prediction.

FIG. 1B shows an effect of rush-hour boundaries for auto-regressiveintegrated moving average and historical average models of trafficprediction.

FIG. 2 shows an example of a hybrid traffic prediction process.

FIGS. 3A and 3B show effects of prediction horizons over an average of adecision parameter for a hybrid forecasting model.

FIG. 4A shows an example of the behavior of the decision parameter overtime.

FIG. 4B shows an example of historical average speed (in miles per hour)to reveal effects of rush-hour boundaries over the decision parameter.

FIG. 5 shows an example of speed predictions from two techniques for atraffic accident as compared with the actual speed.

FIG. 6 shows a definition of impact post-mile.

FIGS. 7A and 7B plot average one-step prediction accuracies over aweekday for a rush hour time interval and a non-rush hour time interval,respectively.

FIGS. 8A-9B show actual speed and mean absolute percent error ofpredictions on two different road segments of 1-5 and 1-10.

FIGS. 10A and 10B show root mean square error in miles per hour (mph)predictions for a rush hour time interval and a non-rush hour timeinterval, respectively.

FIGS. 11A and 11B show the actual speed and mean absolute percent error,respectively, of predictions on road segments of 1-10.

FIGS. 12A and 12B show data and predictions for a sample sensor locatedon east bound of CA-91 affected by three traffic collision events onDec. 7, 2011.

FIGS. 13A and 13B show data and predictions for a 6-hour long roadconstruction event which happened in 1-405.

FIG. 14 shows a comparison of speed predictions generated by mobilesensors with speeds reported by static sensors for an HOV (HighOccupancy Vehicle) lane.

DETAILED DESCRIPTION

The previous traffic prediction approaches can be grouped in two maincategories: Simulation Models and Data Mining Techniques. Some trafficprediction techniques fall into the first category and use surveysand/or simulation models. For example, S. Clark, “Traffic predictionusing multivariate nonparametric regression”, proposes a non-parametricregression model to predict traffic based on the observed traffic data.In other cases, authors use microscopic models upon trajectories ofindividual vehicles to simulate overall traffic data and further conductprediction (see J. D. Gehrke et al., “A natural induction approach totraffic prediction for autonomous agent-based vehicle route planning”,and M. Ben-akiva et al., “DynaMIT: a simulation-based system for trafficprediction”). In another case, the traffic flow of a road segment isestimated by analyzing taxi trajectories. The major limitation of suchstudies is that they rely on sporadic observations and are oftenrestricted to synthetic or simplified data for simulations.

Some traffic prediction techniques fall into the second category and usedata mining techniques. The increase in the availability of real-timetraffic has allowed researchers to develop and apply data miningtechniques to forecast traffic based on real-world datasets. Since theearly 1980s, univariate time-series models, mainly Box-JenkinsAuto-Regressive Integrated Moving Average (ARIMA) (see G. Box et al.,“Time-series analysis: Forecasting and control”) and Holt-WintersExponential Smoothing (ES) models (see R. S. Marshment et al.,“Short-range intercity traffic forecasting using econometrictechniques”, and B. Williams et al., “Urban freeway traffic flowprediction: Application of seasonal autoregressive integrated movingaverage and exponential smoothing models”), have been widely used intraffic prediction. In the last decade, Neural Network (NNet) modelsalso has been extensively used in forecasting of various trafficparameters, including speed, travel time, and traffic flow. Nowadays,ARIMA, ES and NNet models are used as benchmarking methods forshort-term traffic prediction. However, these approaches considertraffic flow as a simple time-series data and ignore phenomenons thatparticularly happen to traffic data. For example, for generictime-series, the observations made in the immediate past are usually agood indication of the short-term future. However, for traffictime-series, this is not true at the edges of the rush hours, due tosudden speed changes.

On the other had, traffic event analysis techniques have also beendeveloped. The effect of events on traffic prediction has been studiedin the fields of data mining and transportation engineering. Many ofthese studies focused on realtime event/outlier detection usingprobabilistic or rule-based approaches (see e.g., X. Li et al., “Ahidden markov model framework for traffic event detection using videofeatures”, A. Ihler et al., “Adaptive event detection with time-varyingpoisson processes”, and X. Li et al., “Temporal outlier detection invehicle traffic data”). There are also several studies that mainlyconcern the cause of the events, aiming at how to design the network orre-direct the traffic flows to avoid the delay of events (see e.g., M.M. Chong et al., “Traffic accident analysis using decision trees andneural networks”, and C. Tsai et al., “Traffic monitoring and eventanalysis at intersection based on integrated multi-video and petri netprocess”). However, none of these studies incorporate events intotraffic prediction techniques, and hence fail to provide realisticestimations in the presence of events.

The focus of the present application, on the other hand, is to integratethe impact of various events into forecasting models. As a point ofcomparison, the model proposed in J. Kwon et al., “Components ofcongestion: delay from incidents, special events, lane closures,weather, potential ramp metering gain, and excess demand” utilizes anearest-neighbor technique to detect cumulative delays and impactregions caused by traffic incidents. The impact regions are defined withfixed thresholds. However, the impact of events on traffic congestionvaries based on space and time. For example, the impact region of anaccident occurring during rush hour is usually more severe. Similarly,an accident at an inter-state street has a different impact region thanthat of a surface street. In the present application, we consider suchspatiotemporal characteristics of traffic events in training our models.

Problem Definition: consider a set of road segments comprising n trafficsensors (e.g., loop detectors). We assume that at given time interval t(e.g., every minute), each sensor provides a traffic data reading, e.g.,speed v[t]. We formulate the speed prediction problem as follows:

-   -   Definition 1: given a set of observed speed readings        V={v_(i)(j), j=1, . . . , n; j=1, . . . , t}, where i and j        denotes a sensor and continuous time increments, respectively.        The prediction problem is to find the set V={vi(j), j=t+1, t+2,        . . . t+h} for each sensor i, where h denotes the prediction        horizon. For example, h=1 refers to predicting the value of        speed at t+1, where t represents the current time.    -   Definition 2: “short-term prediction” and “long-term prediction”        refer to prediction of speed when h=1 and h>1, respectively.

Two techniques are now introduced as baseline approaches of a predictionmodel according to some implementations. These two techniques areAuto-Regressive Integrated Moving Average (ARIMA) and Historical AverageModel (HAM). Implementations using other techniques are also possible.

The ARIMA model is a generalization of an autoregressive moving averagemodel with an initial differencing step applied to remove thenon-stationarity of the data. The model can be formulated asY _(t+1)=Σ_(i=1) ^(P)α_(i) Y _(t−i−1)+Σ_(i=1) ^(q)β_(i)ε_(t−i+1)ε_(t+1)where {Yr} refers to a time-series data (e.g., the sequence of speedreadings). In the autoregressive component of this model (Σ_(i=1)^(P)α_(i)Y_(t−i+1)), a linear weighted combination of previous data iscalculated, where p refers to the order of this model and α_(i) refersto the weight of (t−i+1)-th reading. In the second part (Σ_(i−1)^(q)β_(i)ε_(t−i+1)), the sum of weighted noise from the moving averagemodel is calculated, where Σ denotes the noise, q refers to its orderand β_(i) represents the weight of (t−i+1)-th noise.

As shown in Equation (1), the predicted value mainly relies on thelinear combination of the data that occurred before time t. This modelcan be directly used to predict the traffic speed data, when predictionhorizon h=1. When h>1, we can iterate the prediction process h times byusing the predicted value as the input to predict the next value.

In addition, our analysis on real-world traffic sensor data reveals thatthere is a strong correlation (both temporally and spatially) presentamong the measurements of the single and multiple traffic sensor(s) onroad networks. For example, the traffic condition of a particular roadsegment on Monday at 8:30 am can be estimated based the average of lastfour sensor readings for the same road segment at 8:30 am in the pastfour Mondays. Therefore, we introduce Historical average model (HAM)that uses the average of previous readings for the same time andlocation to forecast the future data. We formulate HAM as follows:

$\begin{matrix}{{v\left( {t_{d,w} + h} \right)} = {\frac{1}{{V\left( {d,w} \right)}}{\sum_{s \in {V{({d,w})}}}{v(s)}}}} & (2)\end{matrix}$where V (d, w) refers to the subset of past observations that happenedat the same time d on the same day w. Specifically, d captures the dailyeffects (i.e., the traffic observations at the same time of the day arecorrelated), while w captures the weekly effects (i.e., the trafficobservations at the same day of the week are correlated). For example,if the traffic data to be predicted is next Monday at 8:00 am, d refersto “8:00 am”, and w=Mon. Thereby V (d, w) refers to the set of trafficdata that happens on previous Mondays at 8:00 am. In fact, the selectionof historical observations is also relevant with seasonal effects. Forexample, the historical observations on Mondays during winter isprobably different with that on Mondays during summer. Here, weeliminate the seasonal effects by assuming there is no season rotationsin our historical observations. Also, as shown in the formula, thefunction to select past observations and calculating the average areindifferent to the value of the prediction horizon h.

One can use either ARIMA or HAM for traffic prediction in road networks.Here, we explain the limitations of both techniques based on ourobservations derived from realworld traffic datasets. Towards that endwe present two case studies using different prediction horizons andtemporal scales (i.e., rush hour boundaries).

In a first case study, we look at the effect of prediction horizon (h).We would like to compare the prediction accuracy of ARIMA and HAM fordifferent prediction horizons using real-world traffic data. Furtherdetails regarding the real-world dataset and experimental setup areprovided below. Note that the aggregation level for this data set inthis first case study is 5 minutes. Our intuition is that ARIMA relieson very recent traffic data, which are usually a good indication of thenear future. On the other hand, HAM uses the average of historical datafor prediction, and hence HAM is more accurate in long-term predictionand its accuracy is independent of the prediction horizon. Ourhypothesis can be summarized as follows:

Hypothesis 1: The prediction horizon has no noticeable effect on theprediction accuracy of HAM. However, as the prediction horizonincreases, the prediction accuracy of ARIMA decreases.

The result of comparison using real data is presented in FIG. 1A in agraph 100, which shows the average mean absolute percentage error ofprediction (y-axis) with respect to prediction horizon (x-axis). Asshown in FIG. 1A, ARIMA yields better prediction than that of HAM whenh<6 (i.e., less than 30-min in advance prediction). However, as hincreases to the values larger than 6, HAM starts to yield betterprediction. This result not only verifies hypothesis 1, but also revealsthat ARIMA is not ideal for long-term predictions (i.e., more than30-min in advance prediction).

In a second case study, the effect of rush hour boundaries isconsidered. The intuition here is that the observations made in theimmediate past are usually a good indication of the short-term future.Therefore ARIMA is excepted to yield accurate prediction in theshort-term. However, the speed change at rush-hour boundaries is suddenand there is no indication (i.e., trend) of such change before ithappens. In such cases, ARIMA cannot capture the speed changes at thevery beginning, but adjusts itself shortly after it takes the changedspeed into account. On the other hand, since rush hours happen at almostsame time of that particular day, HAM can predict the sudden speedchanges at the boundary of rush hours. Our intuition can be summarizedwith the following hypothesis:

-   -   Hypothesis 2: HAM can efficiently predict the sudden speed        changes at the boundaries (i.e., beginning and end) of rush        hours. On the other hand, ARIMA has a delayed reaction on the        boundaries.

In this second case study, we fix the prediction horizon (i.e., h=6) andcompare the prediction accuracy of both approaches over time usingreal-world traffic speed data. The experimental results are depicted inFIG. 1B in a graph 150, which represents the actual speed data andpredicted values from two models (HAM and ARIMA) for a specific sensorat different times of a particular weekday. As shown, in the morningrush hour around 6:50 am, HAM predicts the beginning of congestion witha very small error rate and ARIMA's prediction is shifted (with respectto actual speed) a few timestamps. Similarly, at the vanishing point ofthe rush hour congestions around 9:05 am, HAM still accurately predictsthe after-congestion speed and ARIMA shifts a few timestamps. Theresults show that at the boundaries of rush hours, HAM yields higherprediction accuracy than that of ARIMA. Hence, the Hypothesis 2 isverified.

In view of this, a hybrid forecasting model can be constructed, such asan enhanced ARIMA prediction approach. In some implementations, a hybridforecasting model named Historical ARIMA (H-ARIMA) selects in realtimebetween ARIMA or HAM based on their accuracy. In particular, as thetraffic data streams arrive, the accuracy of ARIMA and HAM can becompared, and the one that yields low prediction error can be selected.As noted, ARIMA relies on recent traffic data, and hence in somecircumstances (i.e., in the long-term when h≥6 and at the boundaries ofrush hours) its prediction accuracy degrades significantly. On the otherhand, HAM uses past observations to predict future traffic conditions.While HAM yields better prediction for long-term, it is not ideal forshort-term predictions. Therefore, the main idea behind this hybridapproach is to distinguish the circumstances when a specific approach isbetter.

Towards that end, a decision-tree model can be trained that selectsbetween ARIMA and HAM to forecast the speed at individual time stamps.In this model, the decision parameter and threshold are denoted as λ₁and ϕ, respectively. For each time stamp t, we choose between ARIMA andHAM based on the trained value of λ₁. If λ₁≤ϕ, we choose ARIMA,otherwise, we choose HAM. The value of λ₁ is calculated based on therate of overall prediction error between HAM and ARIMA at t. Thedetailed approach is described in Algorithm 200 in FIG. 2, given theentire training dataset {v(j)} (j=1 . . . t), together with the value ofd and w.

In Line 1 of Algorithm 200, we initialize dataset S with all thehistorical data observed on day w, at time d. For example, if w=Mon andd=8:00 am, the set of S refers to all the traffic speed readings onMondays at 8:00 am within the training dataset. In Lines 4-9, we utilizeARIMA and HAM to predict speed reading v_(i) in S and compute theirprediction error. In Line 10, is calculated as the ratio of theprediction error from ARIMA versus the sum of prediction errors from twoapproaches. Based on the calculation strategy of 2 in Algorithm 200, weobserve that if λ<0.5, the total prediction error from ARIMA is lessthan that of HAM, which means ARIMA is better for this particular timestamp (i.e., time d on day w). Otherwise, HAM is better. Thereby, we setthreshold ϕ as 0.5.

To further explain the robustness of H-ARIMA, we present the trainingresults for λ in the following two main cases. First, we study theeffect of d on λ. FIGS. 3A and 3B show in charts 300 and 340 the effectof d with respect to the average 2 from all sensors for two differentprediction horizons: h=1 (5 minutes in advance prediction) and h=6 (30minutes in advance prediction). Here, the day parameter w is fixed asWed. FIG. 3A indicates that in short-term prediction (i.e., h=1), theARIMA yields better performance, because most average λ values are lessthan 0.5. FIG. 3B shows that when h=6, there are more time instanceswith λ>0:5. This indicates that HAM starts to provide better predictionaccuracy in the long term (Hypothesis 1). In addition, both charts 300and 340 in FIGS. 3A and 3B show that during the morning and afternoonrush hours (i.e., 6:00 am to 9:00 am, 4:00 pm to 7:00 pm), the accuracyof HAM is not as good as compared to non-rush hours, reflecting that theaverage 2 declines during the rush-hour interval. One possibleexplanation is that during rush hours, the impact of the unexpectedevents (e.g., accident) is more significant than that of non-rush hours.Since the effects of traffic accidents are offset by averaging theentire history, HAM cannot capture such effects. We will address thisproblem in further detail below.

Second, based on the Hypothesis 2, we examine behavior of 2 at theboundaries of rush hours, thereby focusing on the values of λ for aparticular sensor. In FIG. 4A, we plot 400 individual λ value for asingle sensor over all daily time stamps (d). To analyze the behavior ofλ over time, the historical average speed sequence is also plotted 450in FIG. 4B. Here, the prediction horizon is fixed to h=1, and weeklyparameter w=Wed.

In FIG. 4A, there are three time instances where λ>0.5 (i.e., 6:35 am,8:55 am and 4:35 pm). As shown in FIG. 4B, those three time instancesare exactly at the boundaries of rush hours. As indicated, at beginningand ending of the rush hours, HAM model outperforms ARIMA, even thoughthe prediction horizon is only 1.

In view of the points made above, the hybrid model can incorporate theimpact of events in order to improve the prediction accuracy in thepresence of events, such as traffic accidents. Traffic events includenon-recurring incidents (e.g., accident, vehicle breakdown, andunscheduled road construction) which result in traffic congestion ordisruption. In addition, we can consider social events such as a musicconcert at LA Live or Lakers basketball game at Staples Center. In anycase, the effects of such events on traffic congestion in road networkscan be taken into consideration. For example, event information can beincorporated in to H-ARIMA to enhance the prediction accuracy of themodel. Towards this end, historical event reports and the associatedtraffic speed nearby at the time of the events can be exploited to modelthe correlation between event attributes and traffic congestion. Notethat even though the model is built offline by using the past data, themodel can be used online for better traffic prediction. That is, inreal-time using the current event reports as input, the event'sattributes can be matched to find similar events that happened in thepast to predict speed delays and backlogs, caused by the current event.These delay predictions can have improved precision and providequantitative measures of the current event, such as a prediction of aprecise number of minutes (e.g., 7 minutes) of delay as opposed to ageneral range of duration for the event (e.g., 30 minute or less versusmore than 30 minutes).

As discussed above, HAM can hardly react to unexpected traffic events asit eliminates the influence of events by averaging historicalobservations. ARIMA, due to its delayed reaction, is not an ideal methodto use in the case of events which cause sudden changes in thetime-series data. To illustrate the prediction accuracy of ARIMA and HAMin the presence of an event, consider FIG. 5, which shows the speedprediction of both techniques for a traffic accident that happened onfreeway CA-91 at 10:53 am Dec. 5, 2011 with prediction horizon h=6. Asshown, the prediction accuracy of both techniques are significantly lowas compared with the actual speed. Hence, we discuss our Event ImpactArea (EIA) model, which addresses the traffic prediction problem in thepresence of events.

With the EIA, approach event data is used as an input to the algorithm,and this data can include but is not limited to the followingmeta-data: 1) event date, 2) event start-time, 3) event location (i.e.,latitude, longitude), 4) event type (e.g., traffic collision, roadconstruction), 5) type of vehicles involved if incident is an accident,and 6) number of affected lanes. We note that these information areincluded in event data streams that can be collected in a data center(see further details below). We also introduce a parameter, namelyimpact post-mile, to represent the spatial span of an event.

Definition 3: Impact post-mile 630 is the distance between the locationof an event 600 and its last influenced sensor 615 in the oppositedirection of vehicle flow, as shown in FIG. 6.

The influenced sensors 610, 615 are the sensors whose speed reading showan anomalous decline compared with the historical average speed, whereasthe non-influenced sensors 620 do not. In some implementations, theanomalous decline can be detected using the traffic event detectionalgorithm proposed in X. Li et al., “Temporal outlier detection invehicle traffic data”. To find such sensors, we use the speed readingsof the sensors ahead of the event location.

Based on our analysis of real-world data, we observe that impactpost-mile 630 varies across events with different attributes. Let usconsider one of the attributes “start time” as an example. The impactpost-mile of events that happen during day-time may be large comparedwith events happening at midnight, due to higher traffic flow during theday-time. The key to investigating the correlation between eventattributes and impact post-mile is to decide which attributes arecorrelated with impact post-mile. It is likely that some eventattributes are irrelevant or redundant for inferring impact post-mile630. In order to identify the most correlated subset of eventattributes, we can first normalize the event attributes as features andimpact post-mile as numerical classes, and then apply the Correlationbased Feature Selection (CFS) algorithm described in M. A. Hall et al.,“Practical feature subset selection for machine learning” on top of thisnormalized data to select correlated features. We observe that thefollowing event attributes are most correlated with impact post-mile:{Start time, Location, Direction, Type, Affected Lanes}.

We use the selected attributes to classify the impact post-mile 630, andutilize the average impact post-mile to represent the impact of anevent. Table I shows some selected classification results where theimpact post-mile under different start-time is aggregated into four hourintervals denoted as S_(start-hour,end-hour) and “N/A” means that thereis no such event happening with the attributes specified in ourexperimental dataset. When the number of affected lanes equals zero,this indicates that no lanes are blocked as the involved vehicles aremoved to the shoulder of the road after the accident. The dataset usedto train this model includes the events that happen on weekdays, whenrush-hour is considered as 6:00 am to 9:00 am and 4:00 pm to 7:00 pm.

TABLE I AVERAGE IMPACT POST-MILE ON EVENT META-ATTRIBUTES Location DS_(0.4) S_(4.8) S_(8.12) S_(12.16) S_(16.20) S_(20.24) (a) Trafficcollision event, affected lanes = 0 I-405 N 2.07 2.93 3.68 2.92 3.331.51 I-405 S 0.14 3.37 2.61 3.63 4.37 2.03 I-5 N 0.10 3.32 4.12 4.455.51 2.56 I-5 S 1.17 3.66 3.41 2.43 3.73 1.34 (b) Traffic collisionevent, affected lanes = 1 I-405 N N/A N/A 4.74 3.57 3.52 0.46 I-405 SN/A N/A N/A N/A 4.78 1.75 I-5 N N/A N/A 2.02 N/A 6.11 N/A I-5 S 0.10 N/AN/A N/A N/A N/A (c) Road construction event, affected lanes = 1 I-405 N0.96 N/A 9.35 5.02 N/A 1.25 I-405 S 1.73 N/A N/A N/A N/A 0.19 I-5 N N/AN/A 4.70 5.80 5.70 6.50 I-5 S N/A N/A N/A N/A N/A N/A

From the results shown in Table I, we make the following observations.First, from Table 1(a), we observe that for the events happening duringrush hours, the impact post-mile is larger than that of non-rush hours.This is expected because when an accident happens during rush hours on ahigh occupancy road, the impact of that event is more severe than onroads without traffic. Second, comparing Table 1(a) and 1(b), we inferthat for the events happening at similar time, same location, the impactpost-mile is generally larger when the number of affected lanes is more.Obviously, since the affected number of lanes reflects the number oflanes which are blocked by the events, the more lanes blocked, theslower the traffic flow. However, for accidents that occur at midnight,since the traffic is free-flow at that time, the higher number ofaffected lanes does not necessarily indicate longer impact post-mile.Third, in Table 1(c), we observe that for the road construction events,if they happen at day time, especially at rush hours, their impact ontraffic is severe, sometimes exceptionally larger than that of trafficcollisions happening at the same time. On the other hand, if they happenat night, their impact is not that significant.

In addition to impact post-mile, the speed change (speed-impact) causedby events is also very important for traffic prediction. To estimate thespeed-impact, we introduce two factors to assist in event impactprediction: influenced speed change (Δ v) and influenced time shift (Δt). We estimate Δ v based on the correlated attributes (similar toimpact post-mile).

-   -   Definition 4: For sensor i, its influence speed change Δv_(i)        for event e is defined as the average speed changes for all        events that share the same correlated attributes (i.e.,        Start-time, Location, Direction, Type and Affected Lanes) with        e, and affected sensor i in the past.        Once we find the influenced speed change, the next step is to        determine the exact time stamps we need to apply the change on        sensors. When an event occurs, the sensors located at different        locations might be influenced at different time stamps.        Therefore, we define the concept of influenced time shift (Δ t)        to estimate the period of time that a sensor will be affected by        an event.    -   Definition 5: For sensor i, its influenced time shift (Δt_(i))        for event e is defined as the distance between the sensor i and        event e divided by the average traffic speed between them, which        can be represented as follows:

$\begin{matrix}{{\Delta\;{t_{i}(e)}} = {{\frac{{dist}\left( {i,e} \right)}{{ave}\left( \left\{ v_{j} \right\} \right)}\mspace{14mu}{where}\mspace{20mu}{p(i)}} \leq {p(j)} \leq {p(e)}}} & (3)\end{matrix}$where p(i) refers to the post-mile of sensor i. The set of {v_(j)}refers to all the speed readings presented at the sensors locatedbetween sensor i and event e. Below we summarize a procedure to predicttraffic in case of events.

1) When an event e occurs at time t, all the relevant event features(i.e., {Start-time, Location, Direction, Type, Affected Lanes}) areincorporated in the EIA model to determine the impact post-mile of e.

2) Using the impact post-mile and the location of e, the set of allinfluenced sensors are identified as set {s_(i)}.

3) For each sensor s_(i), during [t+t_(i)(e), t+Δt_(i)(e)+h], thepredicted value is calculated as (v_(i)(t)−Δv_(i)), where h is theprediction horizon.

4) After time t+Δt_(i)(e)+h, ARIMA is used to predict the rest until theevent e is cleared.

Using the systems and techniques described above, various experimentswere conducted, the results of which are now described. The experimentalsetup included a traffic dataset, baseline approaches, and fitnessmeasurements. Other implementations are also possible.

Traffic Dataset: In our research center, we maintain a very large-scaleand high resolution (both spatial and temporal) traffic loop detectordataset collected from entire LA County highways and arterial streets.We also collect and store traffic event data from City of Los AngelesDepartment of Transportation and California Highway Patrol. The detaileddescription of this dataset is shown in Table II.

TABLE II DATASET DESCRIPTION duration Nov. 1st-Dec. 7^(th), 2011 SensorData #of sensors 2028 sensor sampling rate 1 reading per 30 secs spatialspan 3420 miles aggregation level 5 mins per sensor Event Data # ofevents 3255 # of event attributes 43

Baseline Approaches: We implemented ARIMA starting with stationaryverification, followed by the iterations of 1 to 10 for Auto Regressivemodel and 1 to 10 for Moving Average model to reach the best combinationunder Bayesian information criteria, such as is described in G. Schwarz,“Estimating the dimension of a model”. We used the trained model forone-step (h=1) forecasting. When h>1 (i.e., long-term forecasting), weiterate the prediction procedure for h times by using predicted value aspreviously observed value.

We implemented an Exponential Smoothing (ES) method as a special case ofARIMA model, with the order auto-regressive model set to zero, and theorder moving average model set to 2. In addition, we implemented NeuralNetwork (NNet) model as multilayer perceptron (MLP). The architecture ofMLP is as follows: 10 neurons in the input layer, single hidden layerwith 4 neurons and h output neuron, where h refers to the predictionhorizon. For example, in one-step forecasting, there is 1 output neuron.The input neurons include {v(k), k=t−9, . . . , t}, while the outputneuron is {v(t+1) . . . v(t+h)}, where t represents the current time.Tangent sigmoid function and linear transfer function are used foractivation function in the hidden layer and output layer, respectively.This model is trained using back-propagation algorithm over the trainingdataset.

Fitness Measurements: We use mean absolute percent error (MAPE) and rootmean square error (RMSE) to quantify the accuracy of traffic prediction.

$\begin{matrix}{{{MAPE} = {\left( {\frac{1}{N}{\sum\limits_{i = 1}^{N}\frac{{y_{i} - {\hat{y}}_{i}}}{y_{i}}}} \right) \times 100}}{{RMSE} = \sqrt{\frac{1}{N}{\sum\limits_{i = 1}^{N}\left( {y_{i} - {\hat{y}}_{i}} \right)^{2}}}}} & (4)\end{matrix}$where y_(i) and ŷ_(i) represent actual and predicted traffic speedrespectively, and n represents the number of predictions.

Initially, predictions are made without event information. In this setof experiments, we used the traffic dataset collected from November 1 toNovember 30 as the training set. The dataset from December 1 to December7 is used as testing set. In a short-term prediction experiment, weevaluated the short-term prediction (i.e., h=1) accuracy of H-ARIMA withrespect to baseline approaches. FIG. 7A plots 700 the average one-stepprediction accuracy over all sensors on a weekday for a rush hour timeinterval. FIG. 7B plots 750, the average one-step prediction accuracyover all sensors on a weekday for a non-rush hour time interval. Asshown, the accuracy of all prediction approaches during rush hour arelower than that of non-rush hours.

Though H-ARIMA outperforms baseline approaches in general, it does notshow clear advantages over them according to the aggregated results(over 2028 sensors). However, as shown with the following experiment,H-ARIMA does have significantly better prediction accuracy than baselineapproaches in the boundaries of rush hours. FIGS. 8A-9B show the actualspeed and MAPE of the prediction on two different road segments of 1-5and 1-10. In graph 800 in FIG. 8A, we observe that there is a suddenspeed decrease around 14:00. Consequently, as shown in plot 850 in FIG.8B at 14:15, we observe a significant increase in the prediction errorof baseline approaches. This is because the baseline approaches cannotdetect the sudden speed decrease in advance. On the other hand, H-ARIMAcan estimate the beginning of congestion from historical pattern andyields better prediction by improving the baseline approaches up to67.0% (at 14:15).

Similarly, as shown in plots 900 and 950 in FIGS. 9A and 9B, the morningrush hour of 1-10 starts around 7:00 am, and H-ARIMA outperformsbaseline approaches up to 61% (at 7:25 am). We note that this set ofexperiments focuses on one-step forecasting where the baselineapproaches can adjust themselves by utilizing the decreased speed,thereby their prediction accuracy recovers shortly.

In long-term prediction experiments, we compare the prediction accuracyof H-ARIMA with baseline approaches for h>1. FIGS. 10A and 10B plot at1000 and 1050 the average six-step (i.e., h=6) prediction accuracy overall sensors on a same weekday, for a rush hour time interval and anon-rush hour time interval, respectively. FIG. 10A shows that whenprediction horizon increases, the prediction errors of baselineapproaches increase, especially during rush hours. In FIG. 10A, weobserve that H-ARIMA yields better prediction accuracy than that ofbaseline approaches. Similar to one-step prediction, in the next set ofexperiment we present the performance of H-ARIMA based on a road segmentwith rush hour congestion.

FIGS. 11A and 11B show the actual speed and MAPE, respectively, of theprediction on road segments of 1-10. As shown in plot 1100 in FIG. 11A,around 7:00 am, the speed decreases from 65 mph to 5 mph within a veryshort time. The baseline approaches can only sense this change with 30minutes delay, and hence their MAPE is considerably high (see plot 1150in FIG. 11B). On the other hand, H-ARIMA utilizes the historicalcongestion information to predict the traffic and hence its MAPE isfairly low as compared to baseline approaches. In particular, H-ARIMAimproves the best baseline approach 78% (at 7:10 am).

Predictions can also be made with event information. In this set ofexperiments, we evaluate the prediction accuracy of our proposedapproach in the case of events, dubbed H-ARIMA+ (discussed in furtherdetail above). We compare H-ARIMA+ with H-ARIMA, and the best baselineapproach in multi-step prediction (i.e., NNet). We set the predictionhorizon of all approaches to 6, which indicates that our algorithm isset to predict speed information 30-minute in advance.

FIGS. 12A and 12B show the result for a sample sensor located on eastbound of CA-91 affected by three traffic collision events on Dec. 7,2011. FIG. 12A illustrates at 1200 the actual speed on that day and thehistorical average (for that weekday) of the selected sensor. Thehistorical average indicates that the rush hour intervals for thissensor are 7:00 am to 8:00 am, and 3:00 pm to 7:00 pm. FIG. 12B plots1250 the prediction error for H-ARIMA+, H-ARIMA, and NNet. Table IIIbelow shows the relevant attributes for each event, where Dist(e, s)refers to the distance between the sensor and corresponding eventlocation. The number of affected lanes equals zero indicates that nolanes are blocked as the involved vehicles moved to the shoulder of theroad after the accident.

As shown in FIG. 12A at 1200, the first two events (i.e., Event 350 andEvent 2116) happened at the beginning of morning and afternoon rushhours, and the last event (i.e., Event 2621) happened near the end ofthe afternoon rush hour. As illustrated in FIG. 12B at 1250, theprediction accuracy of H-ARIMA+ improves the prediction accuracy ofH-ARIMA, NNet by up to 45% and 67%, respectively. We observe that thoughH-ARIMA can capture the sudden speed changes at rush hours, it cannotpredict traffic in case of events. This is because the effect of trafficevents are smoothed in historical averages.

TABLE III RELEVANT EVENT ATTRIBUTES Event ID Start Time No. of AffectedLanes Dist(e, s) 350 06:31 0 0.58 2116 16:06 0 0.10 2621 18:26 0 0.11

We also studied the effect of road construction events on our predictionmodel. FIGS. 13A and 13B show the effect of a 6-hour long roadconstruction event which happened in 1-405 on a specific sensor. Thereis one lane affected by this event and the distance between this eventand the selected sensor is 0.23 mile. As shown in FIG. 13A at 1300, thetraffic speed deviates sharply, especially in the first hour of theevent. Similar to traffic collision events, since ARIMA cannot handlesudden speed changes, and HAM cannot react to traffic dynamics such asevents, the prediction accuracy of H-ARIMA (which selects between ARIMAand HAM) is very low at the beginning half an hour. However, H-ARIMA+utilizes the event information, and yields significantly betterprediction at the beginning of this event by improving H-ARIMA and NNetby up to 91% (see FIG. 13B at 1350).

A summary of findings is shown in Table IV below. We measured theoverall precision of predictions on all sensors aggregated through alltime stamps in terms of RMSE. As shown, H-ARIMA outperforms the baselineapproaches in both prediction horizons. Moreover, when h=6, H-ARIMA+improves the prediction accuracy of H-ARIMA by incorporating eventinformation.

TABLE IV RMSE OF ALL SENSOR PREDICTION ON WEEKDAYS ES ARIMA NNet H-ARIMAH-ARIMA+ h = 1 3.389 3.235 3.315 3.208 N/A h = 6 5.518 4.545 4.154 4.0793.937

Further improvements may also be realized by using mobile sensors, suchas public transit GPS data. In addition to using fixed sensors on roadnetworks for traffic prediction, the approach described herein can beextended to predict traffic from the GPS data collected from mobilesensors (e.g., cell phones, in-car navigation devices, etc.). In thisstudy, we focus on predicting High Occupancy Vehicle (HOV), a.k.a.carpool lane speed from public transit vehicle (e.g., Bus) GPS data. Toachieve this goal, we propose an approach that transforms GPS data tofixed sensor data for prediction purpose. This approach has four maincomponents:

-   -   1. Map-Matching: We map the raw GPS data on to the road network        using map-matching techniques. Any state-of-the-art map-matching        algorithms, such as described in Jing Yuan et al., “An        Interactive-Voting based Map Matching Algorithm”, can be applied        here.    -   2. Route Generation: Since the public transits vehicles follow        predefined routes, based on their mapped road segments, we can        generate the routes as a set of connected road segments.        -   Bus Speed Calculation: Given two consecutive GPS data from            the bus we compute the bus speed as follows.

$v_{r} = \frac{{dist}\left( {l_{i},l_{i + 1}} \right)}{t_{i + 1} - t_{i}}$

-   -   where function “dist” calculates the route distance between two        locations on a given route; 1_(i), and I_(i+1) are the two        adjacent GPS locations of; t_(i) and t_(i+)1 are the        corresponding time stamp of the GPS locations.    -   3. Calculation of Vehicle Speed on Road Segments: The last step        calculates the speed for a single bus, this step focuses on        generating the speed for a road segment, which is calculated as        an aggregation of all bus speed values passing this road segment        at a given time.

To evaluate our approach, we conducted a case study on HOV lanes of 1-10West freeway in city of Los Angeles. In this case study, we choose oneroad segment and compare the time varying speed values generated by ourapproach to the speed value reported by the fixed sensors located on thecorresponding road segment. There are two speed values reported by thefixed sensors: main lane speed and HOV lane speed. As shown in FIG. 14at 1400, the speed predicted by our approach from Bus GPS data is fairlyclose to the speed of the HOV lane reported by static sensors. As shown,our approach can be used for speed prediction of HOV lanes utilizing BusGPS data. This is particularly useful for the road segments where staticsensor data is not available.

In this paper, we studied a traffic prediction technique that usesreal-world spatiotemporal traffic sensor data on road networks. We showthat the traditional prediction approaches that treat traffic datastreams as generic time-series fail to forecast traffic during trafficpeak hours and in the case of events such as accidents and roadconstructions. Our algorithm can significantly improve the predictionaccuracy of existing approaches by incorporating the historical trafficdata into the prediction model as well as correlating the eventattributes with traffic congestion. In this paper, we studied theprediction problem for each sensor individually.

The processes described above, and all of the functional operationsdescribed in this specification, can be implemented in electroniccircuitry, or in computer hardware, firmware, software, or incombinations of them, such as the structural means disclosed in thisspecification and structural equivalents thereof, including potentiallya program (stored in a machine-readable medium) operable to cause one ormore programmable machines including processor(s) (e.g., a computer) toperform the operations described. It will be appreciated that the orderof operations presented is shown only for the purpose of clarity in thisdescription. No particular order may be required for these operations toachieve desirable results, and various operations can occursimultaneously or at least concurrently. In certain implementations,multitasking and parallel processing may be preferable.

The various implementations described above have been presented by wayof example only, and not limitation. Thus, the principles, elements andfeatures described may be employed in varied and numerousimplementations, and various modifications may be made to the describedembodiments without departing from the spirit and scope of theinvention. Accordingly, other embodiments may be within the scope of thefollowing claims.

What is claimed is:
 1. A method comprising: receiving, by one or morecomputers, a request relating to traffic prediction, the request havingan associated day and an associated time; comparing, by the one or morecomputers, a first prediction error for a first traffic prediction modelwith a second prediction error for a second traffic prediction model,wherein the first traffic prediction model comprises a moving averagemodel that exhibits increased prediction accuracy as a prediction timehorizon is reduced, the second traffic prediction model comprises ahistorical average model that exhibits similar prediction accuracyacross multiple prediction time horizons, and both the first predictionerror and the second prediction error are calculated using a historicaldata set selected from previously recorded traffic data in accordancewith the associated day and the associated time; selecting, by the oneor more computers, use of the first traffic prediction model when thefirst prediction error is less than the second prediction error for theassociated day and the associated time; selecting, by the one or morecomputers, use of the second traffic prediction model when the firstprediction error is not less than the second prediction error for theassociated day and the associated time; and providing an output for usein traffic prediction by the one or more computers, wherein the outputcomes from applying the first traffic prediction model when the firstprediction error is less than the second prediction error, and theoutput comes from applying the second traffic prediction model when thefirst prediction error is not less than the second prediction error. 2.The method of claim 1, wherein the associated day and the associatedtime are based on a time and time horizon associated with the request.3. The method of claim 1, wherein the historical data set is selectedfrom the previously recorded traffic data by identifying a subset of thepreviously recorded traffic data that exhibits similar trafficconditions on a specific day of week, month or season that matches theassociated day for the request.
 4. The method of claim 1, comprising:receiving information regarding an event that has one or more attributesthat are correlated with reduction in traffic flow on one or more roadsof a road network approaching the event; calculating an influenced speedchange and an influenced time shift, for a sensor associated with theroad network, based on the information regarding the event; and usingthe influenced speed change and the influenced time shift in applicationof the first traffic prediction model.
 5. The method of claim 4, whereincalculating the influenced speed change and the influenced time shiftcomprises calculating based on attributes for the event comprising (i)start time, (ii) location, (iii) direction, (iv) event type, and (v)affected lanes.
 6. The method of claim 1, wherein the previouslyrecorded traffic data comprises data derived from mobile sensor data. 7.The method of claim 6, comprising generating the derived data byperforming operations comprising: calculating speeds for multiple mobilesensors from mobile sensor data with respect to connected road segmentsin a road network; and generating a speed for a road segment of theconnected road segments by calculating an aggregation of all speedscalculated for mobile sensors passing the road segment at a given time.8. The method of claim 7, wherein the mobile sensor data is obtainedfrom public transit vehicles.
 9. A system comprising: a user interfacedevice; and one or more computers operable to interact with the userinterface device, the one or more computers comprising at least oneprocessor and at least one memory device, and the one or more computersconfigured and arranged to perform operations comprising (i) receiving arequest relating to traffic prediction, the request having an associatedday and an associated time, (ii) determining how much to apply each of afirst traffic prediction model and a second traffic prediction modelbased on previously recorded traffic data corresponding to theassociated day and the associated time, wherein the first trafficprediction model comprises a moving average model that exhibitsincreased prediction accuracy as a prediction time horizon is reduced,and the second traffic prediction model comprises a historical averagemodel that exhibits similar prediction accuracy across multipleprediction time horizons, and (iii) applying the first and secondtraffic prediction models in accordance with the determining to generatean output for use in relation to traffic prediction by the one or morecomputers; wherein the one or more computers are configured and arrangedto perform operations comprising (i) receiving information regarding anevent that has one or more attributes that are correlated with reductionin traffic flow on one or more roads of a road network approaching theevent, (ii) calculating an influenced speed change and an influencedtime shift, for a sensor associated with the road network, based on theinformation regarding the event including start time, location,direction, and severity of the event as compared with similar historicalevents, and (iii) using the influenced speed change and the influencedtime shift in application of the first traffic prediction model.
 10. Thesystem of claim 9, wherein the one or more computers comprise a serveroperable to interact with the user interface device through a datacommunication network, and the user interface device is operable tointeract with the server as a client.
 11. The system of claim 10,wherein the user interface device comprises a mobile phone.
 12. Thesystem of claim 9, wherein the one or more computers comprises onepersonal computer, and the personal computer comprises the userinterface device.
 13. A system comprising: a user interface device; andone or more computers operable to interact with the user interfacedevice, the one or more computers comprising at least one processor andat least one memory device, and the one or more computers configured andarranged to (i) receive a request relating to traffic prediction, therequest having an associated day and an associated time, (ii) compare afirst prediction error for a first traffic prediction model with asecond prediction error for a second traffic prediction model, whereinthe first traffic prediction model comprises a moving average model thatexhibits increased prediction accuracy as a prediction time horizon isreduced, the second traffic prediction model comprises a historicalaverage model that exhibits similar prediction accuracy across multipleprediction time horizons, and both the first prediction error and thesecond prediction error are calculated using a historical data setselected from previously recorded traffic data in accordance with theassociated day and the associated time, (iii) select use of the firsttraffic prediction model when the first prediction error is less thanthe second prediction error for the associated day and the associatedtime, (iv) select use of the second traffic prediction model when thefirst prediction error is not less than the second prediction error forthe associated day and the associated time, and (v) provide an outputfor use in traffic prediction by the one or more computers, wherein theoutput comes from applying the first traffic prediction model when thefirst prediction error is less than the second prediction error, and theoutput comes from applying the second traffic prediction model when thefirst prediction error is not less than the second prediction error. 14.The system of claim 13, wherein the associated day and the associatedtime are based on a time and time horizon associated with the request.15. The system of claim 13, wherein the historical data set is selectedfrom the previously recorded traffic data by identifying a subset of thepreviously recorded traffic data that exhibits similar trafficconditions on a specific day of week, month or season that matches theassociated day for the request.
 16. The system of claim 13, wherein theone or more computers are configured and arranged to receive informationregarding an event that has one or more attributes that are correlatedwith reduction in traffic flow on one or more roads of a road networkapproaching the event, calculate an influenced speed change and aninfluenced time shift, for a sensor associated with the road network,based on the information regarding the event, and use the influencedspeed change and the influenced time shift in application of the firsttraffic prediction model.
 17. The system of claim 16, wherein the one ormore computers are configured and arranged to calculate the influencedspeed change and the influenced time shift based on attributes for theevent comprising (i) start time, (ii) location, (iii) direction, (iv)event type, and (v) affected lanes.
 18. The system of claim 13, whereinthe previously recorded traffic data comprises data derived from mobilesensor data.
 19. The system of claim 18, wherein the one or morecomputers are configured and arranged to generate the derived data, theone or more computers being configured and arranged to calculate speedsfor multiple mobile sensors from mobile sensor data with respect toconnected road segments in a road network, and generate a speed for aroad segment of the connected road segments by calculating anaggregation of all speeds calculated for mobile sensors passing the roadsegment at a given time.
 20. The system of claim 19, wherein the mobilesensor data is obtained from public transit vehicles.